/************************************************************
 * Copyright (C), 2022-2032, dina. Co., Ltd.
 * FileName:        log4qt_plugin.h
 * Author:          Dan Yin
 * Date:            2022-12-08
 * Description:     the class of log plugin
 * Version:         1.0.0.0
 **********************************************************/

#ifndef LOG4QT_PLUGIN_H
#define LOG4QT_PLUGIN_H

#include "i_log4qt.h"

class Log4qtPlugin : public ILog4Qt
{
    Q_OBJECT
    Q_PLUGIN_METADATA(IID ILog4Qt_iid FILE "log4qt.json")
    Q_INTERFACES(ILog4Qt)

public:
    // Output data to the log file
    virtual void outputLog(QtMsgType mgsType, const QString & msgText) Q_DECL_OVERRIDE;

    // Output data to the log file
    virtual void outputLog(QtMsgType mgsType, const QMessageLogContext & msgContext, const QString & msgText) Q_DECL_OVERRIDE;
};

#endif // LOG4QT_PLUGIN_H
